home *** CD-ROM | disk | FTP | other *** search
- 100 'Investment Price ("INVPRICE")
- 110 CLS
- 120 COLOR 0,15 : PRINT "Investment Price" : COLOR 15,0
- 130 DEFDBL A-Z
- 140 MONEYFMT$ = "$$##,###,###.##"
- 150 PRINT : PRINT
- 160 PRINT "Do not enter dollar signs or commas"
- 170 PRINT
- 180 ' Let user enter data
- 190 INPUT "Purchase price of investment: ", PV
- 200 INPUT "Income each period: ", PMT
- 210 INPUT "Desired annual rate of return (in percent): ", AY
- 220 INPUT "Total number of periods: ", NPERIODS
- 230 INPUT "Number of income receipts per year: ", NPY
- 240 INPUT "Annual interest rate (in percent): ", AR
- 250 ' Convert annual rates to periodic rates
- 260 PR = (1 + AR / 100) ^ (1 / NPY) - 1
- 270 PY = (1 + AY / 100) ^ (1 / NPY) - 1
- 280 ' Find present value of income stream
- 290 IF PR <> 0 THEN VALUEINCOME = (PMT / PR) * (1 - (1 + PR) ^ -NPERIODS) ELSE VALUEINCOME = PMT * NPERIODS
- 300 ' Find required selling price
- 310 FV = PV * (1 + PY) ^ NPERIODS - VALUEINCOME * (1 + PR) ^ NPERIODS
- 320 PRINT
- 330 PRINT "Required selling price: "; USING MONEYFMT$; FV
- 340 END